least-descent method